// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建问题 POST /api/module/SmartPhysics */
export async function smartPhysicsCreate(
  body: API.PhysicsQuestionCreateInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result>('/api/module/SmartPhysics', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 批量删除 DELETE /api/module/SmartPhysics/${param0} */
export async function smartPhysicsBulkDeletes(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartPhysicsBulkDeletesParams,
  options?: { [key: string]: any },
) {
  const { ids: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartPhysics/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改状态 PUT /api/module/SmartPhysics/${param0}/${param1} */
export async function smartPhysicsUpdate(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartPhysicsUpdateParams,
  options?: { [key: string]: any },
) {
  const { id: param0, status: param1, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartPhysics/${param0}/${param1}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 是否收藏 PUT /api/module/SmartPhysics/Favorited/${param0} */
export async function smartPhysicsIsFavorited(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartPhysicsIsFavoritedParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartPhysics/Favorited/${param0}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 分页查询 GET /api/module/SmartPhysics/Page */
export async function smartPhysicsPagination(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartPhysicsPaginationParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResult1PhysicsQuestionOutputModel>('/api/module/SmartPhysics/Page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询答案 GET /api/module/SmartPhysics/Query/Answer/${param0} */
export async function smartPhysicsQueryAnswer(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartPhysicsQueryAnswerParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Result1String>(`/api/module/SmartPhysics/Query/Answer/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
